﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Elev.Farmworker.Net;
using Elev.Farmworker.Utility;
using Elev.API.DouBan;
using Elev.MoviesCenter.Controls;
using Elev.MoviesCenter.Utility;

namespace Elev.MoviesCenter
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        private UC_MoviesView ucMoviesView;
        private UC_ImportMovie ucImportMovie;

        public MainWindow()
        {
            InitializeComponent();
            ucMoviesView = new UC_MoviesView();
            ucImportMovie = new UC_ImportMovie();
            LocalCenter.DBEntities = new DataFactory.MoviesCenterDBEntities();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.gdMain.Children.Clear();
            this.gdMain.Children.Add(ucMoviesView);
        }

        private void btnMovieList_Click(object sender, RoutedEventArgs e)
        {
            this.gdMain.Children.Clear();
            this.gdMain.Children.Add(ucMoviesView);
        }

        private void btnSetting_Click(object sender, RoutedEventArgs e)
        {
            this.gdMain.Children.Clear();
            this.gdMain.Children.Add(ucImportMovie);
        }
    }
}
